package com.ihisomp.service.impl;

import com.ihisomp.dto.PathTreeDto;
import com.ihisomp.entity.OmpRolePage;
import com.ihisomp.mapper.OmpRolePageMapper;
import com.ihisomp.service.IOmpRolePageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 标题: OmpRolePageServiceImpl.java
 * 业务描述: 运营管理角色与页面关系 服务实现类
 * 作者: zy
 * 日期: 2021/9/13
 * 版本: V1.0
 */
@Service
public class OmpRolePageServiceImpl extends ServiceImpl<OmpRolePageMapper, OmpRolePage> implements IOmpRolePageService {

    /**
     * 根据角色代码删除角色对应程序
     *
     * @param roleKey
     * @return
     */
    @Override
    public int deleteByRoleKey(String roleKey) {
        return baseMapper.deleteByRoleKey(roleKey);
    }

    /**
     * 根据角色代码查询角色对应程序
     *
     * @param roleKey
     * @return
     */
    @Override
    public List<PathTreeDto> getPageByRoleKey(String roleKey) {
        return baseMapper.getPageByRoleKey(roleKey);
    }


}
